export const formItems = [
  {
    filed: 'memberName',
    type: 'input',
    label: '姓名'
  },
  {
    filed: 'time',
    type: 'datetimerange',
    clearable: false,
    label: '选择时间段',
    pickerOptions: {
      shortcuts: [{
        text: '近7天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 6)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近30天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 29)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近60天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 59)
          picker.$emit('pick', [start, end])
        }
      },
      {
        text: '近90天',
        onClick(picker) {
          const end = new Date()
          const start = new Date()
          start.setTime(end.getTime() - 3600 * 1000 * 24 * 89)
          picker.$emit('pick', [start, end])
        }
      }],
      disabledDate(time) {
        var curDate = new Date(new Date().toLocaleDateString()).getTime()
        var preDate = new Date(curDate + 24 * 60 * 60 * 1000 - 1)
        return time.getTime() > preDate
      }
    }
  },
  {
    filed: 'cardNumber',
    type: 'input',
    label: '卡号'
  },
  {
    filed: 'phoneNumber',
    type: 'input',
    label: '手机号'
  },
  {
    filed: 'code',
    type: 'select',
    label: '交易类型',
    options: [
      { value: '1', label: '开卡' },
      { value: '2', label: '充值' },
      { value: '3', label: '消费' },
      { value: '4', label: '退费' },
      { value: '5', label: '提现' },
      { value: '6', label: '余额调整' }]
  }
]
export const queryFormConfig = {
  formItems,
  online: true
}
